import { defHttp } from "/@/utils/http/axios";

enum Api {
  queryCompanyList = '/index/statistics/queryCompanyList',
  queryIndexStatistics = '/index/statistics/queryIndexStatistics',
  queryIndexChartList = '/index/statistics/queryIndexChartList',
  queryPreItemsTotal = '/index/statistics/queryPreItemsTotal',
}

/**
 * 首页：服务公司列表
 * @param params
 */
export const queryCompanyList = () => {
  return defHttp.get({ url: Api.queryCompanyList }, {isTransformResponse:false});
};

/**
 * 查询首页统计数据
 * @param params
 */
export const queryIndexStatistics = (params) => defHttp.get({ url: Api.queryIndexStatistics, params }, { isTransformResponse: false });


/**
 * 首页：统计趋势
 * @param params
 */
export const queryIndexChartList = (params) => defHttp.get({ url: Api.queryIndexChartList, params }, { isTransformResponse: false });

/**
 * 首页：预充值统计
 * @param params
 */
export const queryPreItemsTotal = () => {
  return defHttp.get({ url: Api.queryPreItemsTotal }, {isTransformResponse:false});
};;
